<%@ page language="java" contentType="text/html; charset=UTF-8"
	pageEncoding="UTF-8"%>
<%
	String path = request.getContextPath();
	String basePath = request.getScheme() + "://" + request.getServerName() + ":" + request.getServerPort()
			+ path + "/";
%>
<!DOCTYPE html>
<html>
<head>
<base href="<%=basePath%>">
<title>标题</title>
<link rel="shortcut icon" href="" type="image/x-icon">
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<meta http-equiv="pragma" content="no-cache">
<meta http-equiv="cache-control" content="no-cache">
<meta http-equiv="expires" content="0">
<meta http-equiv="keywords" content="keyword1,keyword2,keyword3">
<meta http-equiv="description" content="This is my page">

<script type="text/javascript" src="js/jquery-1.8.3.js"></script>
<script type="text/javascript">
	function login() {
		var name = $("#name").val().trim();
		var password = $("#password").val().trim();
		if (name != null && name != "") {
			if (password != null && password != "") {
				$("#login_form").submit();
			} else {
				$("#login_font").text("密码不能为空！");
			}
		} else {
			$("#login_font").text("用户名不能为空！");
		}
	}
</script>
</head>
<body>
	<h3>登录</h3>
	<form action="<%=path%>/User/login_user" method="post" id="login_form">
		<input type="text" placeholder="账号" name="userName" id="name"> <br>
		<input type="password" placeholder="密码" name="userPassword" id="password"><br>
		<input type="button" value="登录" onclick="login()"> 
		<input type="reset" value="重置"> 
		<a href="./Register.jsp">去注册</a>
		<font id="login_font">${login_tips }</font>
	</form>
</body>
</html>